<template>
    <div>
        <my-dialog title="自定义标题" width="30%" :visible="visible" @dialogvisible="dialogvisible=false" @dialoghide="dialoghide">
            <template v-slot:body>传入内容</template>
            <span slot="footer" class="dialog-footer">
                <el-button>取消</el-button>
                <el-button type="danger">确定</el-button>
            </span>
        </my-dialog>
    </div>
</template>

<script>
import MyDialog from '@/components/Dialog/index.vue'
export default {
    components: {
        MyDialog
    },
    props: {


    },
    data() {
        return {
            visible: true,
        };
    },
    computed: {

    },
    created() {

    },
    mounted() {

    },
    watch: {

    },
    methods: {
        dialogvisible(value) {
            this.dialoghide = value;
        },
        dialoghide(done) {
            this.$confirm('确定关闭？').then((_) => {
                console.log('执行回调', done);
                this.dialogvisible = done
            })
                .catch((_) => { })
        },
    }
};
</script>

<style scoped lang="scss">

</style>
